import 'package:event_bus/event_bus.dart';

class GlobalEventBus {
  late EventBus bus;

  factory GlobalEventBus() => _getInstance();

  static GlobalEventBus get instance => _getInstance();

  static GlobalEventBus? _instance;

  GlobalEventBus._() {
    bus = EventBus();
  }

  static GlobalEventBus _getInstance() {
    return _instance ??= GlobalEventBus._();
  }
}
